package com.heima.ec_platform;

public class Member {
    private String name;
    private String email;

    public Member() {
    }

    public Member(String name, String email) {
        this.name = name;
        this.email = email;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getEmail() {
        return email;
    }

    public void setEmail(String email) {
        this.email = email;
    }

    public void purchase(Product p) {
        System.out.println(getName() + " 买了个 " + p.getName() + " 花了 " + p.getPrice() + "那么老些钱,有事儿请联系 " + getEmail());
    }

}
